package cn.itrigger.dynamic.sql.structure;

import java.sql.JDBCType;
import java.util.Objects;

/**
 * @author admin
 * @date 2018/9/20
 **/
public class SqlTable {

    private String name;

    private String alias;

    private SqlTable(String name) {
        this.name = Objects.requireNonNull(name);
    }

    public String name() {
        return this.name;
    }

    public SqlColumn column(String name) {
        return SqlColumn.of(name,this);
    }

    public SqlColumn column(String name, JDBCType jdbcType) {
        return SqlColumn.of(name,this,jdbcType);
    }

    public static SqlTable of(String name) {
        return new SqlTable(name);
    }
}
